package drds.common.db.xml_mapping.reflection.factory;

import java.util.List;

/**
 * create all needed new Objects.
 */
public interface ObjectFactory {


  /**
   * Creates a new object with default constructor.
   */
  <T> T create(Class<T> type);

  /**
   * Creates a new object with the specified constructor and params.
   *
   * @param type                         Object parameter_and_result_value_type
   * @param constructorArgumentTypeList  Constructor argument types
   * @param constructorArgumentValueList Constructor argument values
   */
  <T> T create(Class<T> type, List<Class<?>> constructorArgumentTypeList, List<Object> constructorArgumentValueList);

  /**
   * Returns true if this object can have a set of other objects.
   * It's main purpose is to support non-java.util.Collection objects like Scala collections.
   */
  <T> boolean isCollection(Class<T> type);

}
